package com.yingyi.web.controller;

import com.yingyi.result.JsonResult;
import com.yingyi.service.IVerifyCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class VerifyCodeController {

    @Autowired
    private IVerifyCodeService verifyCodeService;


    @GetMapping("/verifycode/imageCode/{key}")
    public JsonResult generateVerifyCode(@PathVariable("key") String key) {
        return verifyCodeService.generateVerifyCode(key);
    }
}
